<?php

/**
 * oRs
 *
 * @version 3.0
 * @copyright 2009 Ron Planken
 * @class: system
 * @description: Handles all main class and utility calls
 */

class system
{
				public $_db;
				public $_util;
				
				function __construct() {
					session_defaults();
					
				 	$this->_util = new utilities();
				 	
				 	$this->_db = new database($this->_util);
				}
				
				function session_defaults() {
					$_SESSION['logged'] = false;
					$_SESSION['uid'] = 0;
					$_SESSION['username'] = '';
					$_SESSION['cookie'] = 0;
					$_SESSION['remember'] = false;
					$_SESSION['level'] = 0;
					$_SESSION['class_display'] = 0;
					$_SESSION['signup_display'] = 0;
				}
				
				function is_allowed($level) {
					if ($level <= $_SESSION['level']) {
						return true;
					} else {
						return false;
					}
				
				}
}

?>
